﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TasksManagerService.cs" company="JaguarLabs">
//   JaguarLabs 2013
// </copyright>
// <summary>
//   Used to provide the service interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace TasksManagerServices
{
    using System;
    using System.Collections.Generic;
    using System.ServiceModel;
    using TasksManagerServices.Value_Objects.Services;
    using TasksManagerServices.ValueObjects;

    /// <summary>
    /// Used to provide the service interface.
    /// </summary>
    [ServiceContract]
    public interface ITasksManagerService
    {
        /// <summary>
        /// Gets the user tasks.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <returns></returns>
        [OperationContract]
        IEnumerable<Task> GetUserTasks(string user);

        /// <summary>
        /// Inserts the task.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="description">The description.</param>
        /// <param name="endDate">The end date.</param>
        /// <param name="priorityId">The priority id.</param>
        /// <param name="notificationDate">The notification date.</param>
        /// <param name="projectId">The project id.</param>
        /// <param name="progress">The progress.</param>
        /// <param name="showInCalendar">if set to <c>true</c> [show in calendar].</param>
        /// <param name="users">The users.</param>
        /// <returns></returns>
        [OperationContract]
        InsertResponse InsertTask(string name, string description, DateTime endDate, int priorityId,
                                     DateTime? notificationDate, int projectId, int progress, bool showInCalendar,
                                     string[] users);

        /// <summary>
        /// Updates the task.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="name">The name.</param>
        /// <param name="description">The description.</param>
        /// <param name="endDate">The end date.</param>
        /// <param name="priorityId">The priority id.</param>
        /// <param name="notificationDate">The notification date.</param>
        /// <param name="projectId">The project id.</param>
        /// <param name="progress">The progress.</param>
        /// <param name="showInCalendar">if set to <c>true</c> [show in calendar].</param>
        /// <param name="users">The users.</param>
        /// <returns></returns>
        [OperationContract]
        UpdateResponse UpdateTask(int id, string name, string description, DateTime endDate, int priorityId,
                                     DateTime? notificationDate, int projectId, int progress, bool showInCalendar,
                                     string[] users);

        /// <summary>
        /// Deletes the task.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <returns></returns>
        [OperationContract]
        UpdateResponse DeleteTask(int id);

        /// <summary>
        /// Gets the projects.
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        IEnumerable<Project> GetProjects();
    }    
}
